package mil.af.amc.adpetracker.web.actions;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.DynaActionForm;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Please Fill in this Javadoc
 *
 * @author TSgt Jason Ferguson
 */

public class EquipmentReportSelectorAction extends AbstractAction {

    @Override
    public ActionForward execute(ActionMapping actionMapping,
                                 ActionForm actionForm,
                                 HttpServletRequest httpServletRequest,
                                 HttpServletResponse httpServletResponse) throws Exception {

        DynaActionForm form = (DynaActionForm) actionForm;

        httpServletRequest.setAttribute("adpeAccountId", form.get("adpeAccountId"));
        httpServletRequest.setAttribute("equipmentTypeId", form.get("equipmentTypeId"));
        httpServletRequest.setAttribute("manufacturerId", form.get("manufacturerId"));

        return actionMapping.findForward("success");
    }
}
